home *** CD-ROM | disk | FTP | other *** search
-
-
- FRM2PRG Version 2 Documentation
-
-
-
- I. Overview . . . . . . . . . . . . . . . . . . . . . . . 1
- A. What It Is . . . . . . . . . . . . . . . . . . . . . . 1
- B. What Good Is It? . . . . . . . . . . . . . . . . . . . 1
- C. Usage . . . . . . . . . . . . . . . . . . . . . . . . 1
- 1. Command-line Switches . . . . . . . . . . . . . . . 2
- 2. Examples . . . . . . . . . . . . . . . . . . . . . 2
- II. Limitations . . . . . . . . . . . . . . . . . . . . . . 3
- III. History . . . . . . . . . . . . . . . . . . . . . . . . 3
- IV. Registration And Sundry Commercials . . . . . . . . . . 5
- V. Order Form . . . . . . . . . . . . . . . . . . . . . . 6
-
-
- FRM2PRG Version 2 Documentation
-
-
-
- I. Overview
-
- A. What It Is
-
- This program attempts to convert a dBASE FRM file to a PRG (procedure) file. If
- you don't know what one or both of those are, stop now. This program is not
- for you.
-
- If you're masochistic enough to use dBASE IV at this point, FRM2PRG is also not
- for you. Modify the templates for dBASE IV instead, if you have a coupla spare
- months [grin].
-
-
- B. What Good Is It?
-
- I often prototype reports using MODIFY REPORT, then when the thing gets OK'd or
- whatnot I write a custom PRG to do the report, adding some enhancements.
- FRM2PRG enables me to generate a PRG file directly from the FRM file, and then
- make any modifications.
-
- FRM2PRG should make life easier when converting someone else's app.
-
- ...and, of course, those of you who actually *use* FRM files with compiled apps
- can now compile them right into the EXE files as PRGs. This may cut down on
- EXE size (or then again, it may not).
-
-
- C. Usage
-
- At the DOS prompt: FRM2PRG {switches} filename{.frm}
-
- Expressions in curly braces are optional.
-
- Output is written to the console by default, but can be also sent to a file
- (see below). The output file contains several procedures, one of which is
- called "xxx_main" ("xxx" defaults to the first three letters of the FRM
- filename unless specified--see "switches" below). As FRM files do not contain
- the name of the database file(s) used, there are some places left to fill it
- (them) in. After setting up your DBFs and relationships, etc., you can:
-
- SET PROCEDURE TO <output file from FRM2PRG>
- DO xxx_MAIN
- CLOSE PROCEDURE
-
- ... or you can fill in the SELECTs and USEs within file generated by FRM2PRG.
- Of course you can also insert SET RELATION, SET FILTER, complicated formulae,
- and so on.
-
-
-
-
-
-
-
-
-
- -- page 1 --
-
-
- FRM2PRG Version 2 Documentation
-
-
-
- 2. Command-line Switches
-
- Switches must be preceded by "/" or "-". They can be in either upper or lower
- case. Most switches require a parameter to follow them immediately. Switches
- supported by version 2.0 are ("*" to right means new in 2.0):
-
- O (o) -- output file name (defaults to console); *
- T (t) -- "Tab" width -- number of spaces for indents (default: 4); *
- (use just /t for physical tabs, /t0 for no indents at all)
- P (p) -- three letter Prefix for procedure names (default: "any");
- S (s) -- Screen output *
- A (a) -- plAin page *
- U (U) -- sUmmary report only *
- L (l) -- Loop condition (default: ".NOT. EOF()");
- I (i) -- Initial command after opening databases (default: "GO TOP");
- E (e) -- Ending command (default: "CLOSE DATA").
-
- The latter three switches may often encompass more than one "word", if so, it
- gets a little trickier--you enclose the switch, the preceding "-" or "/", and
- the parameter in double quotes, i.e., "/iGO thisrec". In the case of the
- "Initial command" and "Ending command", you can override them entirely by
- using /i or /c with no parameter.
-
-
- 3. Examples
-
-
- FRM2PRG /T5 /pCUS "-iSET FILTER TO x=y" "/L&scope" myreport
-
- FRM2PRG attempts to read myreport.frm and send output to the screen.
- Indentation is in multiples of 5, procedure names start with "CUS_", the
- initial command after opening databases is "SET FILTER TO x=y", and the
- terminating condition is "&scope" (main loop will say "DO WHILE &scope").
-
- FRM2PRG "-iON ESCA DO prntrupt" "/EDO endrep" -OMONTHEND.PRG monthend
-
- FRM2PRG reads MONTHEND.FRM and creates MONTHEND.PRG. Procedure names start with
- the default prefix (first three letters of the FRM filename), indents are in
- multiples of 4 (unless you override), initial and ending commands are "ON ESCA
- DO prntrupt" and "DO endrep".
-
- FRM2PRG /T testform -S -U -A -Otestproc.prg
-
- FRM2PRG reads TESTFORM.FRM, overrides the plAin page and sUmmary settings, and
- makes a procedure file to write the report to the screen (TESTPROC.PRG). Note
- that if TESTPROC.PRG exists it will be overwritten without bothering to back it
- up [grin]. Also, if the FRM output is 80 or more characters wide the program
- will bomb.
-
-
-
-
-
-
-
-
- -- page 2 --
-
-
-
- FRM2PRG Version 2 Documentation
-
-
-
- II. Limitations
-
- FRM2PRG should convert most dBASE III Plus FRM files. Multiple-row headings
- should come out fine. Multiple-row fields or expressions should also work, up
- to 4 deep. FRM2PRG will have a problem, however, if you stack fields and put a
- space between "'" and "+":
-
- EXPRESSION+";"+EXPRESSION && OK
- EXPRESSION+';'+EXPRESSION && OK
- EXPRESSION+ ";" +EXPRESSION && NOT OK
- EXPRESSION+ ';' +EXPRESSION && NOT OK
- EXPRESSION;EXPRESSION && NOT OK
-
- The biggest limitation of this program is that it attempts to emulate REPORT
- FORM exactly in most ways. As there are a lot of options such as "plain page",
- "summary only", etc. that can produce varied output, FRM2PRG still may need
- some testing to see if it does, indeed, emulate REPORT FORM properly. However,
- thanks to Dale Geffs, J. O'Loughlin, Martin Schiff, Randy Wallin, and others
- whose names I have misplaced [grin], this version should be pretty clean. All
- known bugs should be fixed.
-
- Differences in output between the PRG and the FRM:
-
- o Subtotals are printed on the same page. I just can't stand to do it
- otherwise, even though dBASE often doesn't. You may have to adjust the
- variable "max_lines" downward to avoid page overflow.
-
- o Since dBASE III Plus FRMs do not store the type of each expression, the only
- way I can figure out to right-justify numeric data is to check the fields
- which specify "number of decimals" and "total." This means nontotalling
- numeric fields with 0 decimals (and their headers) may display out of
- alignment unless you add a PICTURE clause yourself.
-
- o Screen output: FRM2PRG generates "write-to-screen" code
- because people asked for it, but FRMs don't do a very good job
- of screen reporting in general. FRM2PRG attempts to enhance
- the FRM screen output a bit by (1) clearing the screen between
- pages, and (2) pausing at each full screen. Furthermore, IF
- YOUR REPORT IS WIDE ENOUGH TO WRAP TO THE NEXT LINE THINGS
- WILL GET SCREWED UP ROYALLY. (This means only use reports
- with a width that will fit entirely on the screen.)
-
-
- III. History
-
- First Beta release (0.2): 8/5/87
- Second Beta release (0.4): 8/7/87
- Third Beta release (0.6): 8/15/87
- Fourth Beta release (0.6a): 8/26/87
- First "real" release (1.0): 10/15/87
- Release 2.0: 4/2/89
-
-
-
-
- -- page 3 --
-
-
-
- FRM2PRG Version 2 Documentation
-
- Version 0.4:
-
- o USEs and SELECTs now moved to *before* control-break "holds" initialized.
- o A misunderstanding of how C "break" works caused @...SAYs in PROC PRINLOOP
- to only show fields up to the first totalled field. Fixed (I hope).
- o added PICTURE clauses to right-justify numerics (with limitations, see
- above). o changed initializations of headers to use [] instead of "" so
- embedded quotes would not screw things up.
- o put in an IIF() for indentation of "** Subtotal **" and the like, the
- better to emulate FRM stuff.
-
- Version 0.6:
-
- o fixed subscript problem (?) that was causing garbage in output (sometimes) o
- optimized output code slightly, eliminated major_tots logical field, etc. o
- added options for procedure prefixes, tabs, loop condition, initial command,
- ending command.
- o sent help and error messages to stderr, and beefed 'em up.
-
- Version 0.6a:
-
- o changed names of subtots & tots to numerics instead of using the whole field
- expression, which was pretty stupid [grin]--alias names and complex
- expressions came out pretty weird. o fixed totals and subtotals so they
- print on the same line.
- o fixed so grand totals would not print on a separate page.
- o fixed margin in minor total routine.
- o changed the date format so it now prints to the right with the time under
- it. This is the first real departure from deBASE's FRM output, I could make
- it optional but this is the way I like it.
-
- Version 1.0:
-
- o fixed (I hope) problem with blank column headers not being filled--in other
- words, if column a didn't have a second line of heading, column b's
- heading heading ended up in column a.
- o Right-justified numeric columns' headings.
- o Changed default prefix for procedures to first 3 letters of FRM filename.
- o found out what "plain page" really means (grin).
- o changed total-variable names to be a little more readable, other trivial
- cosmetics in output and program.
-
- Version 2.0:
-
- o fixed situation where major and minor holds only got reset if there were
- total fields, and multiple times if there were multiple total fields.
- o fixed silly reassignment of fields[i] (not good practice [grin]) which
- caused ugly gibberish in PRG file.
- o straightened out other ugly crap like char *anythang=" " instead of char
- anythang[]=" " (gee, he can almost code C these days).
- o added bell to error routine.
- o added -O (output filename) option.
- o fixed summary reports.
- o added plAin page and sUmmary command line options.
- o fixed reiterative major group print (caused bolding? [grin]).
- o eliminated need to use last parameter for FRM filename.
- o added -S "output to screen" option.
- o changed time display to show twelve-hour AM/PM format.
- o enhanced "tab" option to make physical tabs if desired.
-
- -- page 4 --
-
-
-
- FRM2PRG Version 2 Documentation
-
-
-
- IV. Registration And Sundry Commercials
-
- Commercial time:
-
- FRM2PRG was developed using information and techniques from the book: dBASE
- POWER: Creating and Using Programming Tools, published by Ashton-Tate (I'm a
- co-author, along with Pete Olympia and Randy Wallin). Peter was nice enough to
- lay out the report form structure in terms even my primitive mentality could
- grasp.
-
- This may be the last version of FRM2PRG. Then again, it may not [grin]. The
- long range plan is to produce a complete report generator to accompany
- SCRIMAGE, my screen/menu design tool. Registered users of FRM2PRG will
- probably get a discount on the next thing, whatever it may be, if it actually
- happens. Pretty reassuring, huh? Actually, suggestions are welcome at this
- point and now that SCRIMAGE IS SHIPPING! I'll be devoting more and more time to
- the report generator project.
-
- I never asked for any money for FRM2PRG in versions before this. However, I
- have received an enormous number of phone calls, which ends up costing me mucho
- money. I also took a lot more time with this version. What all this is
- leading up to is a request for bucks, natch. I am asking $40 for the program
- and access to my BBS. The BBS is no big deal but I provide support there and I
- also try to occasionally post some interesting programs. And it all costs me
- $$$, folks [grin].
-
- If you feel like spending more, I have a bunch of miscellaneous BIN routines
- for dBASE and whatnot that I call the Synergy Utilities. To subscribe to the
- Synergy Utilities and the BBS (big deal), send $75. (Send $115 for the utils
- and FRM2PRG.)
-
- What? You don't need BIN routines, but you could use a utility to make input
- and display screens and menus? Send $99 for SCRIMAGE, the premiere screen and
- menu design tool for dBASE programmers. (SCRIMAGE is *not* shareware, but a
- "demo" version is available that is fully functional except that it cannot save
- some file types for later retrieval and modification). SCRIMAGE comes complete
- with a printed manual, demo screen and menu designs, extra utilities for
- "popping" screens from various environments, and A THIRTY DAY MONEY-BACK
- GUARANTEE!
-
- If you are one of those well-intentioned people like me who tend to never get
- around to sending the check in, rest easy. You are hereby granted permission
- to use this program forever with no royalty. You are not, however, allowed to
- sell the program or to include it with something you charge for without my
- permission. Please DO NOT call for support if you are not registered!
-
- ...enclose $5 extra for shipping and handling if you want a disk mailed to you
- with the latest version(s), or if you are ordering SCRIMAGE. (Most of the
- utils are very small, as they are written largely in assembly language and C,
- so download time is minimal.)
-
- Good luck with FRM2PRG, I hope you enjoy it.
-
- R. Russell Freeland
- Compuserve 76146,371
- -- page 5 --
-
- ORDER FORM
- SYNERGY CORP. SOFTWARE
- 4/89
- ======================
-
- I'm a quick-and-dirty deBASE programmer and I'm not ashamed to admit it! I wish
- to register/order the following software from Synergy Corp.:
-
- (check all that apply)
-
- __ FRM2PRG2: translates dBASE FRM files to semi-lucid PRG form.
-
- (shareware, $40, no printed manual)
-
- __ Synergy Utilities: miscellaneous BIN routines and OBJ files to add
- functionality to dBASE language environments.
-
- (shareware, $75, no printed manual)
-
- __ SCRIMAGE, the premiere screen and menu design tool.
-
- (not shareware, $99, printed manual, demo screen designs, extra utilities
- included for "popping" full/partial screens from dBASE, Clipper, DOS, and
- other environments Real Soon Now)
-
- __ $5 shipping and handling for shipping handling (if you are registering
- shareware and don't need a disk, don't bother, otherwise mandatory).
-
- Total amount enclosed: $_______
-
- Where to send all the big bucks:
- R. Russell Freeland
- Synergy Corp.
- 1780 SW 43 Ave.
- Ft. Lauderdale, FL 33317
-
- I understand that subscription to any or all of this software includes
- subscription to the Synergy BBS. SCRIMAGE also has a 30-day money back
- guarantee (you have to say why you can't use it [grin]).
-
- Name: ____________________________________________
-
- Phone: (work) ________________(home)_______________
-
- Address: __________________________________________
-
- City: _____________________________________________
-
- State: _____________________ Zip: ________________
-
-
- Compuserve number: ________________________________
-
- Comments/suggestions: _____________________________________________________
-
- ___________________________________________________________________________
-
- ___________________________________________________________________________
-